package com.zx.mes.hyl.mapper;

import com.zx.mes.hyl.entity.SysUser;
import org.apache.ibatis.annotations.Select;

/**
 * sys-user 表接口
 *
 * @author huayunlong
 * @date 2018-8-28
 */
public interface SysUserMapper {

    /**
     * 根据用户id获取一个sysUser对象
     *
     * @param id id
     * @return SysUser sysUser
     */
    @Select("select * from sys_user where id=#{id}")
    SysUser getOne(String id);

//
//    @Select("SELECT * FROM users")
//    @Results({
//            @Result(property = "userSex",  column = "user_sex", javaType = UserSexEnum.class),
//            @Result(property = "nickName", column = "nick_name")
//    })
//    List<UserEntity> getAll();
//
//    @Select("SELECT * FROM users WHERE id = #{id}")
//    @Results({
//            @Result(property = "userSex",  column = "user_sex", javaType = UserSexEnum.class),
//            @Result(property = "nickName", column = "nick_name")
//    })
//    UserEntity getOne(Long id);
//
//    @Insert("INSERT INTO users(userName,passWord,user_sex) VALUES(#{userName}, #{passWord}, #{userSex})")
//    void insert(UserEntity user);
//
//    @Update("UPDATE users SET userName=#{userName},nick_name=#{nickName} WHERE id =#{id}")
//    void update(UserEntity user);
//
//    @Delete("DELETE FROM users WHERE id =#{id}")
//    void delete(Long id);
}
